package com.imc.platform.frame.mapper;

import com.imc.platform.base.menu.pojo.Menu;
import com.imc.platform.frame.pojo.ImagesDto;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

@Mapper
public interface ICommonMapper {
    /**
    *QY 2018/9/29 21:12
    *方法描述：获取最小值
    **/
    String getMaxId(@Param("tableName")String tableName);

    @Select("SELECT LAST_INSERT_ID()")
    int getAutoInsertId();

    /**
    *QY 2018/9/29 21:12
    *方法描述：赋值
    **/
    int setMaxId(@Param("id") String id,@Param("tableName") String tableName);

    int updateMaxId(@Param("id") String id,@Param("tableName") String tableName);

    List<Menu> queryMenuByRoleIdAndMenuId(@Param("roleId") String roleId, @Param("menuId") String menuId);

    String queryMealUrlByParentId(String parentId);

//    ImagesDto queryAttrUrlById(Map<String,Object>parms);
    String queryAttrUrlById(Map<String,Object>parms);
}
